package com.daxue.common.http.core;

/**
 * @author daxue0929
 * @date 2022/4/7
 */

public interface RateLimiter {
    long NO_TIME_OUT = -1L;

    long now();

    boolean acquire();

    boolean acquire(int permits);

    boolean acquire(int permits, long timeOut);

    void release();
}
